﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="ShowOrganizationList.aspx.cs" Inherits="SD.UI.ShowOrganizationList" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Show Organization List</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="PanelShowOrgList" runat="server">
        <div>
            <table width="100%">
                <tr>
                    <td colspan="3">
                        <div>
                            <h1>
                                Organization List
                            </h1>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="menu">
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnAll" runat="server" Text="All" onclick="lbnAll_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbn09" runat="server" Text="0-9" onclick="lbn09_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnABCDE" runat="server" Text="A B C D E" 
                                    onclick="lbnABCDE_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnFGHIJ" runat="server" Text="F G H I J" 
                                    onclick="lbnFGHIJ_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnKLMN" runat="server" Text="K L M N" 
                                    onclick="lbnKLMN_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnOPQR" runat="server" Text="O P Q R" 
                                    onclick="lbnOPQR_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnSTUV" runat="server" Text="S T U V" 
                                    onclick="lbnSTUV_Click">
                                </asp:LinkButton>
                            </p>
                            <p>
                                <asp:LinkButton CssClass="Link" ID="lbnWXYZ" runat="server" Text="W X Y Z" 
                                    onclick="lbnWXYZ_Click">
                                </asp:LinkButton>
                            </p>
                        </div>
                    </td>
                    <td>
                        <div style="float:right">
                            <asp:Button ID="btnCreate" runat="server" Text="Create" 
                                onclick="btnCreate_Click" />
                        </div>
                    </td>
                    <td>
                        <div style="float:right">
                            <asp:CheckBox ID="chkInActive" runat="server" Text="Include In-Active" 
                                Checked="false" oncheckedchanged="chkInActive_CheckedChanged" 
                                AutoPostBack="True"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" align="center">
                        <div>
                            <asp:GridView ID="gvOrganizationList" runat="server" 
                                AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" 
                                onpageindexchanging="gvOrganizationList_PageIndexChanging" 
                                onsorting="gvOrganizationList_Sorting" PageSize="15" DataKeyNames="OrgId" 
                                onselectedindexchanged="gvOrganizationList_SelectedIndexChanged" 
                                EmptyDataText="Don't have data in system."  Width="100%" CellPadding="3" 
                                GridLines="Horizontal" BackColor="White" BorderColor="#E7E7FF" 
                                BorderStyle="None" BorderWidth="1px" CssClass="Org">
                                 <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                                 <EmptyDataRowStyle BorderStyle="None" Wrap="False" />
                                 <Columns>                                    
                                    <asp:BoundField DataField="OrgId" Visible="False"/>
                                    <asp:TemplateField HeaderText="Organization Name" SortExpression="Name"> 
                                        <ItemTemplate>
                                            <a href="#" onclick="onOrgClick(this);">
                                            <%#DataBinder.Eval(Container.DataItem,"Name") %></a>
                                            <asp:HiddenField ID="hdregId" runat="server" 
                                            Value='<%#DataBinder.Eval(Container.DataItem,"orgId") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="Line1" HeaderText="Head Office Address Line 1" 
                                                 SortExpression="Line1" />
                                    <asp:BoundField HeaderText="Postcode" DataField="PostCode" 
                                                SortExpression="PostCode" />
                                    <asp:BoundField HeaderText="Contact" DataField="Contact"
                                                SortExpression="Contact" />
                                    <asp:BoundField HeaderText="Is Active?" DataField="IsActive" 
                                                SortExpression="IsActive" />
                                </Columns>
                                 <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                                 <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                                 <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />                             
                                  <HeaderStyle  BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                                 <AlternatingRowStyle BackColor="#F7F7F7" />
                            </asp:GridView>
                            <br />
                            <asp:Label ID="lblMessage" runat="server" Text="" ForeColor="Red"></asp:Label>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</asp:Content>
